package viewmodel;


import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;

import com.uber.autodispose.FlowableSubscribeProxy;
import com.xgggh.redpack.domain.auth.Auth;
import com.xgggh.redpack.domain.auth.AuthReq;
import javax.inject.Inject;
import io.reactivex.Flowable;
import model.Rsp;
import repository.OauthRepository;

public class OauthViewModel extends BaseViewModel<OauthRepository> {
    OauthRepository repository;
    @Inject
    public OauthViewModel(OauthRepository repository) {
        this.repository = repository;
    }

    public Flowable<Rsp<Auth>> token(AuthReq auth) {
        Flowable<Rsp<Auth>> data=repository.token(auth);
        return data;
    }



    public Flowable<Rsp>  logout() {
        Flowable<Rsp>  data=repository.logout();
        return data;
    }



}
